﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MyAccount.ascx.cs" Inherits="Zebra.Umbraco.Marcos.MyAccount1" %>
<form id="form1" runat="server">
<p>
    <asp:Label ID="Label1" runat="server" AssociatedControlID="AccountType">
                        帐号类型:</asp:Label>
    <asp:Label ID="AccountType" runat="server" />
    <asp:LinkButton ID="btnUpgrade" runat="server" Text="升级"></asp:LinkButton>
</p>
<p>
    <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="LoginName1">
                        用户名:</asp:Label><asp:LoginName ID="LoginName1" runat="server" />
</p>
<p>
    <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="FullName">
                        姓名:</asp:Label><br />
    <asp:TextBox ID="FullName" runat="server" TextMode="SingleLine" MaxLength="50" Columns="50"></asp:TextBox>
</p>
<p>
    <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="CompanyName">
                        公司名:</asp:Label><br />
    <asp:TextBox ID="CompanyName" runat="server" TextMode="SingleLine" MaxLength="50" Columns="50"></asp:TextBox>
</p>
<p>
    <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email">
                        邮件地址:</asp:Label><br />
    <asp:TextBox Columns="50" ID="Email" runat="server"></asp:TextBox>
    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="Email"
        ErrorMessage="邮件地址格式不正确" ToolTip="邮件地址格式不正确" ValidationGroup="CreateUserWizard1"
        ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
    <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email"
        ErrorMessage="E-mail is required." ToolTip="请输入邮件地址" ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
</p>
<p>
</p>
<p class="no-border">
    <asp:Button runat="server" Text="保存" ValidationGroup="CreateUserWizard1" ID="btnSave"
        CssClass="button" OnClick="btnSave_Click" />
</p>
<p>
    <asp:Label ID="lbCurrentPassword" runat="server" AssociatedControlID="Email">
                        旧密码:</asp:Label><br />
    <asp:TextBox Columns="50" ID="CurrentPassword" runat="server" TextMode="Password"></asp:TextBox>
    <br />
    新密码:<br />
    <asp:TextBox ID="NewPassword" Columns="50" runat="server" TextMode="Password"></asp:TextBox>
    <asp:CustomValidator ID="xxxx" runat="server" ValidateEmptyText="false" ClientValidationFunction="valComments_ClientValidate"
        ControlToValidate="NewPassword" ErrorMessage="密码长度为6-20位且不包含空格" ToolTip="密码长度为6-20位且不包含空格"
        ValidationGroup="PasswordGroup">*</asp:CustomValidator>
    <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="NewPassword"
        ErrorMessage="密码长度为6-26位且不包含空格" ToolTip="密码长度为6-26位且不包含空格" ValidationGroup="PasswordGroup">*</asp:RequiredFieldValidator>
    <br />
    确认密码:
    <br />
    <asp:TextBox Columns="50" ID="ConfirmPassword" runat="server" TextMode="Password"></asp:TextBox>
    <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="NewPassword"
        ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="请确认登录密码和确认密码是否一致"
        ToolTip="请确认登录密码和确认密码是否一致" ValidationGroup="PasswordGroup">*</asp:CompareValidator>
    <br />
    <asp:Button ID="Button1" runat="server" CssClass="button" Text="修改密码" ValidationGroup="PasswordGroup"
        OnClick="Button1_Click" />
</p>
<p>
    <asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>
</p>
<p>
</p>
<script language="javascript">
    function valComments_ClientValidate(source, args) {
        if (args.Value.trim().length > 6 && args.Value.trim().length < 26) {
            args.IsValid = true;
        }
        else {
            args.IsValid = false;
        }
    }
</script>
</form>
